// Copyright 2022 Huawei Cloud Computing Technology Co., Ltd.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//     http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

#ifndef CLOUDAPPENGINE_CAEHEADER_H
#define CLOUDAPPENGINE_CAEHEADER_H

#include <string>
#include <vector>
#include "CaeCommon.h"

class Header {
public:
    Header(const std::string key)
    {
        m_key = key;
    }

    Header(const std::string &key, const std::string &value)
    {
        m_key = key;
        m_values = value;
    }

    std::string GetKey()
    {
        return m_key;
    }

    const std::string &GetValue()
    {
        return m_values;
    }

    void SetValue(const std::string value)
    {
        m_values = value;
    }

    bool operator < (const Header &r) const
    {
        return CaeCommon::ToLowerCaseStr(this->m_key).compare(CaeCommon::ToLowerCaseStr(r.m_key)) < 0;
    }

    ~Header() {}
private:
    std::string m_key;
    std::string m_values;
};


#endif // CLOUDAPPENGINE_CAEHEADER_H
